<?php

/**
 * 
 */
class Areas_model extends CI_Model {

    function __construct() {
        parent::__construct();
        $this->load->database();
    }

    public function returnIdOfArea($area_shortage) {
        $sql = "SELECT area_id FROM areas where shortage='" . $area_shortage . "'";
        $query = $this->db->query($sql);
        return $query->row_array();
    }

    public function returnAllAreas() {
        $sql = "SELECT * FROM areas";
        $query = $this->db->query($sql);
        return $query->result_array();
    }

}
?> 


